package com.itshare.video.mapper.custom;

import com.itshare.video.pojo.dto.RegisterDTO;
import com.itshare.video.pojo.po.Role;
import com.itshare.video.pojo.po.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author lyr
 * @create 2020/10/24 11:18
 */
public interface UserMapperCustom {

    /**
     * 根据主键 或者  email 查询用户
     * @param pk
     * @param email
     * @param password
     * @return
     */
    User selectUserByPrimaryKeys(@Param("pk") Long pk, @Param("email") String email, @Param("password") String password);

    User selectAvatarByPk(@Param("pk") Integer pk);
    /**
     * 用户登录注册 插入一条数据
     * @param registerDTO
     * @return
     */
    int insertOne(RegisterDTO registerDTO);

    Role selectRole(@Param("userId") Integer userId);



}
